<!DOCTYPE html>
<html>
<head>
<title>{{\Cache::get('blog_config')['name']}}</title>
<meta name="keywords" content="{{\Cache::get('blog_config')['keywords']}}" />
<meta name="description" content="{{\Cache::get('blog_config')['description']}}" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title></title>
<style type="text/css">
*{
    margin:0px;
    padding:0px;
}
body, button, input, select, textarea {
    font: 12px/16px Verdana, Helvetica, Arial, sans-serif;
}
#container {
   min-width:603px;
   min-height:767px;
}
</style>
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key={{\Cache::get('blog_config')['map_key']}}"></script>
<script>
var geocoder,map,marker = null;
var init = function() {
    //调用地址解析类
    geocoder = new qq.maps.Geocoder({
        complete : function(result){
            var center = new qq.maps.LatLng(result.detail.location.lat,result.detail.location.lng);
			map = new qq.maps.Map(document.getElementById('container'),{
				center: center,
				zoom: 15
			});
			//创建标记
			var marker = new qq.maps.Marker({
				position: center,
				map: map
			});
			//添加到提示窗
			var info = new qq.maps.InfoWindow({
				map: map
			});
			//获取标记的点击事件
			qq.maps.event.addListener(marker, 'click', function() {
				info.open(); 
				info.setContent('<div style="text-align:center;white-space:nowrap;margin:10px;">地址：{{\Cache::get('blog_config')['location']}}</div>');
				info.setPosition(center); 
			});
        }
    });
	geocoder.getLocation("{{\Cache::get('blog_config')['location']}}");
}
</script>
</head>
<body onload="init()">
<div id="container"></div>
</body>
</html>
